#include<stdio.h>
int main()
{
 int n,a,b,c,x=0; 
 scanf("%d",&n);
 for(a=0;a<=n/5;a++)
 {
for(b=0;b<=n/3;b++)
{
if(3*(n-5*a-3*b)+a+b==n)
{
printf("%d %d %d\n",a,b,3*(100-5*a-3*b));
 x++;
}
}
}
if(x==0)
printf("NO");
}

